<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
 
   response.setHeader("X-UA-Compatible", "IE=Edge");

 %>
 <%@ include file="/WEB-INF/views/common/common.jsp"%>
<!doctype html>
<html lang="KR">
<head>
<meta charset="utf-8">
<title>게시글 삭제</title>
<link href="./include/css/jquery-ui.css" rel="stylesheet">
<style type="text/css">
#right.list { width: 695px !important;padding: 10px 0 10px 100px !important; }
#all_btn {width:610px;height:65px;border-bottom: 1px solid #ccc;margin-bottom: 15px;}
#fieldlist {width:775px;height:506px;background-color:white;margin:0 auto;}
#fieldlist ul li {float:left;}
#fieldlist ul li p {text-align:center; vertical-align:top;}


#fieldlist ul li .title { border:1px solid #666666; height:26px; }
#fieldlist ul li .title p { background:#666666; color:#fff; line-height:26px !important; }

#iden_num {width:120px;height:20px;border:1px solid #DEDEDE;text-align:center; color:#FF4351}
#checknum {width:30px;height:20px;border:1px solid #DEDEDE;}
#title {width:150px;height:20px;border:1px solid #DEDEDE;}
#text_content {width:230px;height:20px;border:1px solid #DEDEDE;}
#type {width:120px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#date {width:120px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#condition {width:120px;height:20px;border:1px solid #DEDEDE;text-align:center;}
#check_box {width:120px;height:20px;border:1px solid #DEDEDE;}
label, p { line-height:20px !important; }
#content ul li { font-size:12px; line-height: 20px; }
.simple-pagination { width: 540px !important; }
.paging .hide {display:block; height: 0; width: 0; font-size: 0; line-height: 0; margin: 0; padding: 0; overflow:hidden;}
.paging{padding:19px; text-align:center;}
.paging a{display:inline-block; width:23px; height:23px; padding-top:4px; vertical-align:middle;}
.paging a:hover{text-decoration:underline;}
.paging .btn_arr{text-decoration:none;}
.paging .btn_arr, .paging .on{margin:0 3px; padding-top:0; border:1px solid #ddd; border-radius:30px; /* background:url(/front/img/com/btn_paging.png) no-repeat; */}
.paging .on{padding-top:1px; height:22px; color:#fff; font-weight:bold; background:#000;}
.paging .on:hover{text-decoration:none;}

.paging .first{background-position:left top;}
.paging .prev{background-position:-50px top;}
.paging .next{background-position:-100px top;}
.paging .last{background-position:-150px top;}
.paging .del {position:relative;left:330px;}

</style>



<script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });



   $(function() {
    $( "#datepicker2" ).datepicker();
  });
  </script>

<script type="text/javascript" >
			var contextPath= "<c:out value='${pageContext.request.contextPath}'/>";
			var cpage= "<c:out value='${pd.cpage}'/>";
			var totalPage= "<c:out value='${pd.totalPage}'/>";
			var board_cd= "<c:out value='${AdminDto.board_cd}'/>";
</script>
	
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/home/home.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/jquery.simplePagination.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/admin/admin.js"></script>
<link href="${pageContext.request.contextPath}/resources/css/simplePagination.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="${css}/admin.css">
<style type="text/css">
#input_profile {width:200px;height:40px; line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#change_profile {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#delete_profile {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#change_photo {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#delete_board {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;background-color:#eee;}
#change_photo {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
#input_home {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center; margin-top:5px;border-top: 1px solid #ccc;}
#pcbang {width:200px;height:40px;line-height:40px;border-bottom:solid 1px #ccc;text-align:center;}
</style>

</head>

<script>
	setSelectBox("<c:out value='${AdminDto.board_type}'/>");
</script>
<BODY>
<div id="wrapper">
	<div id="header">
		<h2>IP 리스트</h2>  
    </div>  <!-- header End -->

	<div id="content">
	<ul>
		<li id="left">
		<form id="menu" name="menu">
			
			<div class="left">
			<%@ include file="/WEB-INF/views/common/leftmenu.jsp"%>
			</div>
		</form> 
	</li>
	
    <li id="right" class="list">
    <form id="frm" name="frm"  method="post" action="/admin/upboarddel.do" >
    <input type="hidden" name="cpage" value="${pd.cpage}">
    <input type="hidden" name="totalPage" value="${pd.totalPage}">

	<div id="all_btn">

         <p> <label for="select_teacher"> 그룹선택 :</label>
								<select id="board_cd" name="board_cd">
									<c:choose>
									<c:when test="${AdminDto.groupid  eq null or AdminDto.groupid eq '' }">
									<option value=""  > -선택-  </option>
									</c:when>
									<c:otherwise>

									</c:otherwise>
									</c:choose>                       
								</select>   
				 
			   <label for="select_condition"> 상태 :</label>
				              <select id="select_condition">
                                    <option value="vitality"> 활성 </option>
									<option value="del"> 삭제  </option>
 
                               </select>
			 
			 <!-- <button id="button">검 색</button>  --> 
			 <a  id="searchaBtn" > <img src="${img}/btn_board_search.gif" alt="검색" /></a>
			 </p>

	</div>    <!-- all_btn End -->

	<div id="fieldlist">

    <ul>
       <li>
		<div id="checknum" class="title">
		   <p> NO </p>
		</div>
	
		</li>
	    <li>
			<div id="iden_num" class="title">
			 <p> 그룹 아이디</p>
			</div>
		</li>
	
		<li>
		<div id="iden_num" class="title">
		  <p> 그룹이름</p>
		</div>
	    </li>
		
		<li>
		<div id="date" class="title">
		   <p> IP주소  </p>
		</div>
	
		</li>
	
		
	 
	    <li>
		<div id="date" class="title">
		   <p> 등록일  </p>
		</div>
	
		</li>
	
	      <li>
			<div id="condition" class="title">
			    <p> 상   태 </p>
			</div>
		    </li>
 

	</ul>




<c:forEach items="${list}" var="item" varStatus="status">
	<ul>
	
	    <li>
	
		
		<div id="checknum" >
		  <p>  <input type ="checkbox" id ="checkValue" name ="checkValue" value ="${item.idx}"/>${item.idx}</p>
		</div>
		</li>
	 	<li>
			<div id="type"> 
				${item.groupid}
			 </div>
		</li>
		<li>
		<div id="iden_num"> 	${item.groupnm}</div>
	    </li>	  
	
	    <li>
		<div id="date">${item.ipaddress} </div>
		</li>
	
		 <li>
		<div id="date">${item.regtime} </div>
		</li>
	   <li>
	<div id="condition">
	    <p> 
	    		<c:if test="${'Y' eq item.use_yn}">
								활성
				</c:if>
				<c:if test="${'N' eq item.use_yn}">
								비활성
				</c:if>	 	 
	     </p>
	</div>
    </li>
	   
	
	
	</ul>
</c:forEach>
	
  <div id="light-pagination" class="pagination"></div>
	
	<script>

$('#light-pagination').pagination({

		items: 1, // Total number of items that will be used to calculate the pages.
		
		itemsOnPage: 1, // Number of items displayed on each page.
		
		pages:totalPage,  // If specified, items and itemsOnPage will not be used to calculate the number of pages.
		
		displayedPages:5, // How many page numbers should be visible while navigating. Minimum allowed: 3 (previous, current & next)
		
		edges:2, 
		
		currentPage: cpage, // Which page will be selected immediately after init.
		
		hrefTextPrefix: "?board_cd="+board_cd+"&cpage=", // A string used to build the href attribute, added before the page number.
		
		hrefTextSuffix: '', // Another string used to build the href attribute, added after the page number.
		
		prevText: "Prev", // Text to be display on the previous button.
		
		nextText: "Next", // Text to be display on the next button.
		
		cssStyle: "light-theme", // The class of the CSS theme.
		
		selectOnClick: true, // Set to false if you don't want to select the page immediately after click.
		
		
		onPageClick: function(pageNumber, event) {
			// Callback triggered when a page is clicked
			// Page number is given as an optional parameter
					//selectPagelist(pageNumber, event);
			
			console.log("pageNumber="+pageNumber);
			console.log("event="+event);
			
			return;
			
		},
		
		
		
		});

</script>     
	
	  
	<button id="ajaxDataBtn" >삭제</button>
	</div>
	


	
    </div>    <!-- content End -->
	</form>
	</li>  <!-- right End -->
	
	</ul>


	</div>  <!-- contents End -->


	 
 </div>    <!-- wrapper End -->

 <script src="./include/external/jquery/jquery.js"></script>
<script src="./include/js/jquery-ui.js"></script>


  
 </BODY>


</HTML>
